<!DOCTYPE html >
<html lang="en" class="one_huder">
<head>
    <meta charset="UTF-8">
    <title>公章卫士管理平台</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <title>登录</title>
    <link rel="stylesheet" href="/asset/layui/css/layui.css">
    <link rel="stylesheet" href="/asset/css/index.css?v=80901008">
    <script type="text/javascript" src="/asset/js/jquery-3.3.1.min.js"></script>
    <script src="/asset/layui/layui.js" charset="utf-8"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo"><img src="asset/images/logon.png" alt=""></div>
    </div>
    <div class="login_box">
        <div class="flesx">
            <form method="post" class="layui-form">
                <div class="login_form">
                    <h4 class="login_title">管理员登录</h4>
                   <p class="user_number">手机号码：${party.userLoginId?substring(0,3)}****${party.userLoginId?substring(7)}</p>
                    <div class="input_buttonbox">
                        <input type="text" name="smscode" id="smscode" placeholder="请输入短信验证码" class="fl">
                        <input type="button" value="获取验证码" class="fr code_btn" id="sendsms">
                    </div>
                    <input type="submit" lay-submit lay-filter="login" value="登&nbsp;&nbsp;&nbsp;&nbsp;录" class="button_box">
                </div>
            </form>
        </div>
        <div class="layui-carousel" id="test10">
            <div carousel-item="">
                <div>
                    <div class="imges" style="background:url(asset/images/login_bg1.jpg)no-repeat center top ;"></div>
                </div>
                <div>
                    <div class="imges" style="background:url(asset/images/login_bg1.jpg) no-repeat center top ;"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="footer">
    <p>服务热线：021-09875564</p>
    <p>版权所有 © 2018-2028 公章卫士 沪ICP备11057864-1号</p>
</div>
<script>
    layui.use(['carousel', 'form'], function () {
        var carousel = layui.carousel;
        var form = layui.form;
        
        
        $("#sendsms").click(function(){
        
        	regist.sendButt=$(this);
        	
        	$.ajax({
      			type:"POST", 
      			url:"/sms/send.htm",
      			data:{mobile:'${party.userLoginId}'},
      			success:function(result) {
		      		if(result.code=='1'){
      					regist.startTime();
		      			layer.msg("验证码发送成功，请注意查收");
		      		}else{
		      		 	layer.msg(result.msg);
		      		}
		      
		    	 } 
		    }); 
			    
			return false;
        
        })
        
        
        //监听提交
        form.on('submit(login)', function (data) {

            $.ajax({
                type: "POST",
                url: "/check/submit.htm",
                data: data.field,
                success: function (result) {
                    if (result.code == '1') {
                        layer.msg('登录成功');
                        location.href = '/index.htm'

                    } else {
                        layer.msg(result.msg);
                    }

                }
            });

            return false;
        });
        carousel.render({
            elem: '#test10',
            width: '100%',
            height: '536px',
            interval: 5000,
            indicator: 'none'
        });
        
        
        var regist={
			countdown: 60,
			startTime: function() {
				if (regist.countdown <= 0) {
					regist.sendButt.removeAttr('disabled').css('background','#e9221f');
					regist.sendButt.val("重新发送");
					regist.countdown = 60;
				} else {
					regist.sendButt.attr('disabled','true').css('background','#d2d2d2');
					regist.sendButt.val(regist.countdown + "秒");
					regist.countdown--;
					setTimeout(function() {
						regist.startTime()
					}, 1000)
				}
			}
		}
        
        
    });
</script>
</body>
</html>